package comparators;

import java.util.Comparator;

import brewery.Beer;

public class BeerAlcoholComparator implements Comparator<Beer>{
	public int compare(Beer beer1, Beer beer2){
		int beer1Alcohol = beer1.getAlcohol();
		int beer2Alcohol = beer2.getAlcohol();
		
		if(beer1Alcohol>beer2Alcohol){
			return 1;
		} else if (beer1Alcohol<beer2Alcohol){
			return -1;
		} else {
			return 0;
		}
	}
}
